home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CWL2A_1.ARJ / UPDATE.DOC < prev    next >
Text File  |  1991-11-16  |  22KB  |  705 lines

  1.    Here are the last minute changes to The C Window Library manual:
  2.  
  3.  
  4.    Popup Menu Macros
  5.    -----------------
  6.  
  7.    The following macros have been added to The C Window Library Version 2.0:
  8.  
  9.    POPUP_SCROLL_UP_CHAR(p) - This is the scroll up character that is displayed
  10.                              if the POPUPMOUSESCROLL option is on for the
  11.                              popup menu p.  The default character is the up
  12.                              arrow.
  13.  
  14.    POPUP_SCROLL_DOWN_CHAR(p) - This is the scroll down character that is
  15.                                displayed if the POPUPMOUSESCROLL option is on
  16.                                for the popup menu p.  The default character is
  17.                                the down arrow.
  18.  
  19.    POPUP_SCROLL_UP_ATTR(p) - This is the color attribute for the scroll up
  20.                              character that is displayed if the
  21.                              POPUPMOUSESCROLL option is on for the popup menu
  22.                              p.  The default character is the attribute of the
  23.                              popup window.
  24.  
  25.    POPUP_SCROLL_DOWN_ATTR(p) - This is the color attribute for the scroll
  26.                                down character that is displayed if the
  27.                                POPUPMOUSESCROLL option is on for the popup
  28.                                menu p.  The default character is the attribute
  29.                                of the popup window.
  30.  
  31.    POPUP_SCROLL_UP_ROW(p) - This is the row that the scroll up character is
  32.                             displayed in the popup window.  The default is the
  33.                             bottom border of the window
  34.  
  35.    POPUP_SCROLL_UP_COLUMN(p) - This is the column that the scroll up character
  36.                                is displayed in the popup window.  The default
  37.                                is column 1.
  38.  
  39.    POPUP_SCROLL_DOWN_ROW(p) - This is the row that the scroll down character is
  40.                               displayed in the popup window.  The default is the
  41.                               bottom border of the window
  42.  
  43.    POPUP_SCROLL_DOWN_COLUMN(p) - This is the column that the scroll down
  44.                                  character is displayed in the popup window.
  45.                                  The default is column 1.
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.    Popup Menu's pre-function for mouse
  59.    -----------------------------------
  60.  
  61.    When the POPUPMOUSESCROLL option is used for popup menus, the menu can be
  62.    scrolled automatically by placing the mouse on either the up or down scroll
  63.    characters on the popup window, and pressing the left mouse button.
  64.  
  65.    The normal pre-function for the popup menu, namely the function pointed to
  66.    by global_popup_prefunc, is disabled if you use the mouse to scroll through
  67.    the entries in the manner described above.  If you want to perform a
  68.    function when the menu bar is moved automatically from choice to choice, you
  69.    should use the popup_mouse_move_func function pointer.  Here is the
  70.    prototype:
  71.  
  72.       void (*popup_mouse_move_func)(POPUP_MENU_PTR p, unsigned current)
  73.  
  74.    p is the current popup menu, and current is the current selection that the
  75.    highlight bar is on.
  76.  
  77.    Note the difference in the second argument.  The global_popup_prefunc
  78.    function pointer has a pointer to an integer as the second argument, while
  79.    the popup_mouse_move_func has an integer as the second argument.  Also
  80.    note that the popup_mouse_move_func returns nothing, while the
  81.    global_popup_prefunc returns a value back to the menu manager.
  82.  
  83.    If you use the mouse the 'normal' way (pointing the mouse to the actual menu
  84.    entry and moving the mouse up or down while holding the left mouse button
  85.    down), the normal pre-function is not disabled.
  86.  
  87.    The reason for having the popup_mouse_move_func function pointer is that
  88.    there may be a description displayed for each menu entry, where the
  89.    displaying of the menu entry is done by the function pointed to by
  90.    global_popup_prefunc.  Here is a small example:
  91.  
  92.  
  93.  
  94.    #include "menu.h"
  95.    #include "cwlmouse.h"
  96.    int display_choice();
  97.    void do_display_choice();
  98.  
  99.    POPUP_MENU_PTR p;
  100.    /* other initializations */
  101.  
  102.    main()
  103.    {
  104.      WindowInitializeSystem();
  105.      WindowSaveInitial();
  106.      MouseInitializeSystem(MOUSE_FULL_INSTALL,&b,1,1);
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.      p = PopupCreateMenu(/* arguments */);
  115.      PopupSetOptions(p,POPUPMOUSE|POPUPMOUSESCROLL,1);
  116.      global_popup_prefunc = display_choice;
  117.      popup_move_mouse_func = do_display_choice;
  118.  
  119.      /*
  120.          ...
  121.  
  122.             */
  123.  
  124.    }
  125.  
  126.    display_choice(POPUP_MENU_PTR p, int *choice)
  127.    {
  128.       /* display info for entry in a window */
  129.       return POPUP_CONTINUE;
  130.    }
  131.  
  132.  
  133.    void do_display_choice(POPUP_MENU_PTR p, int choice)
  134.    {
  135.      display_choice(p,&choice);
  136.    }
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.   Creating menus dynamically
  171.   --------------------------
  172.  
  173.   You can now create bar and popup menus dynamically, instead of using the
  174.   static method explained in the manual.
  175.  
  176.  
  177.   Creating popup menu entries dynamically
  178.   ---------------------------------------
  179.  
  180.   Here is an example:
  181.  
  182.   Usual method:
  183.   ------------
  184.  
  185.   POPUP_MENU_ENTRY menu_items[] = {
  186.                                   " Load      F3", /* entry name */
  187.                                     1,             /* row number */
  188.                                    'L',            /* hotkey */
  189.                                     F3,            /* secondary hotkey */
  190.                                     menu_func,     /* function to call if
  191.                                                       chosen */
  192.                                   " Pick  Alt-F3",2, 'P',ALTF3,menu_func,
  193.                                   " New"         ,3, 'N',0,menu_func,
  194.                                   " Save      F2",4, 'S',F2,menu_func,
  195.                                   " Write to    ",5, 'W',0,menu_func,
  196.                                   " Directory   ",6, 'D',0,menu_func,
  197.                                   " Change Dir"  ,7, 'C',0,menu_func,
  198.                                   " OS shell"    ,8, 'O',0,menu_func,
  199.                                   " Quit  Alt-X"  ,9,'Q',ALTX,menu_func,
  200.  
  201.                                  /* Terminate with a CWL_NULL and 0 */
  202.  
  203.                                   CWL_NULL,0};
  204.  
  205.  
  206.   New Method
  207.   ----------
  208.  
  209.   #include "menu.h"
  210.   #define NUMENTRIES 9
  211.  
  212.   POPUP_MENU_ENTRY_PTR menu_array; /* Notice that we have a pointer to what
  213.                                       will be an array of POPUP_MENU_ENTRY's
  214.                                    */
  215.   POPUP_MENU_PTR p;
  216.  
  217.   main()
  218.   {
  219.     WindowInitializeSystem();
  220.  
  221.     /* Initialize with at least number of total entries */
  222.     menu_array = PopupAllocate(NUMENTRIES);
  223.  
  224.  
  225.  
  226.     /* Call function to create entries in menu_array sequentially */
  227.     PopupCreateEntry(menu_array,   /* POPUP_MENU_ENTRY pointer */
  228.                 1,            /* entry number */
  229.  
  230.         /* The rest of the arguments are just like the old method */
  231.                 " Load    F3", /* menu string */
  232.                 1,             /* row number */
  233.                 'L',           /* hotkey letter */
  234.                 F3,            /* secondary hotkey */
  235.                 menu_func);    /* function to perform */
  236.  
  237.  
  238.     /* do rest of the entries */
  239.     PopupCreateEntry(menu_array,2," Pick  Alt-F3",2,'P',ALTF3,menu_func);
  240.     PopupCreateEntry(menu_array,3," New",3,'N',0,menu_func);
  241.     PopupCreateEntry(menu_array,4," Save      F2",4,'S',F2,menu_func);
  242.     PopupCreateEntry(menu_array,5," Write to    ",5,'W',0,menu_func);
  243.     PopupCreateEntry(menu_array,6," Directory   ",6,'D',0,menu_func);
  244.     PopupCreateEntry(menu_array,7," Change Dir  ",7,'C',0,menu_func);
  245.     PopupCreateEntry(menu_array,8," OS Shell    ",8,'O',0,menu_func);
  246.     PopupCreateEntry(menu_array,9," Quit  Alt-X ",9,'Q',ALTX,0,menu_func);
  247.  
  248.     /* end all of the menu entries */
  249.     PopupEntryEnd(menu_array,NUMENTRIES);
  250.  
  251.     /* create menu */
  252.     p = PopupCreateMenu(menu_array, /* rest of the arguments */);
  253.  
  254.     /* ... */
  255.  
  256.     /* Dispose of menu entries created */
  257.     PopupDeallocate(menu_array);
  258.   }
  259.  
  260.  
  261.   The difference between the above method and the method used to globally
  262.   initialize an array are the following:
  263.  
  264.   1) The variable type for menu_array is POPUP_MENU_ENTRY_PTR, not
  265.      POPUP_MENU_ENTRY as the normal method would have done.
  266.  
  267.   2) You must call the PopupAllocate() function to allocate space for the
  268.      number of entries desired.  If you do not call PopupAllocate(), you will
  269.      surely get a memory overwrite error.  The return value to PopupAllocate()
  270.      must be assigned to a POPUP_MENU_ENTRY_PTR, as the above example shows.
  271.  
  272.      The array of menu entries are allocated from the heap at runtime, as
  273.      opposed to the static method which sets up the memory scheme at link time.
  274.  
  275.   3) The next thing you must do is to fill in the entry information by calling
  276.      the PopupCreateEntry() function.  The first argument to the
  277.      PopupCreateEntry() function is the POPUP_MENU_ENTRY_PTR.  The second
  278.      argument is the entry
  279.  
  280.  
  281.  
  282.      number to assign this information to.  The rest of the arguments are the
  283.      same order as the usual method i.e. menu string, row, hotkey, etc.
  284.      PopupCreateEntry() is called for each field desired.
  285.  
  286.   4) The PopupEndEntry() function must be called to terminate the list of
  287.      entries.  The first argument is the POPUP_MENU_ENTRY_PTR, and the second
  288.      argument is the total number of entries defined.
  289.  
  290.   5) You should call PopupDeallocate() to free the memory assigned to the array
  291.      of menu_entries.  The only argument to PopupDeallocate() is the
  292.      POPUP_MENU_ENTRY_PTR.  Only call PopupDeallocate() after you have called
  293.      PopupMenuFree() or any function that disposes of the POPUP_MENU_PTR.
  294.  
  295.  
  296.   All of these functions except for PopupAllocate() have no return values.
  297.   The PopupAllocate() function returns a POPUP_MENU_ENTRY_PTR if successful,
  298.   and a null pointer if unsuccessful.
  299.  
  300.   The advantages of using the above method over the first method is that
  301.   POPUP_MENU_ENTRY's are dynamically allocated rather than statically declared
  302.   at compile time.  This allows the programmer to create loops to set up
  303.   the entries, read entry information from a file and assign this info to a
  304.   POPUP_MENU_ENTRY, etc.
  305.  
  306.  
  307.   You could also do the following:
  308.  
  309.   #include "menu.h"
  310.   #define NUMENTRIES 9
  311.  
  312.   POPUP_MENU_ENTRY menu_array[NUMENTRIES+1]; /* We must have at least 1 more
  313.                                                 than the number of entries */
  314.   POPUP_MENU_PTR p;
  315.  
  316.   main()
  317.   {
  318.      /* ... */
  319.  
  320.     /* Call function to create entries in menu_array sequentially */
  321.     PopupCreateEntry(menu_array,   /* POPUP_MENU_ENTRY pointer */
  322.                 1,            /* entry number */
  323.  
  324.         /* The rest of the arguments are just like the old method */
  325.                 " Load    F3", /* menu string */
  326.                 1,             /* row number */
  327.                 'L',           /* hotkey letter */
  328.                 F3,            /* secondary hotkey */
  329.                 menu_func);    /* function to perform */
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.     /* do rest of the entries */
  339.     PopupCreateEntry(menu_array,2," Pick  Alt-F3",2,'P',ALTF3,menu_func);
  340.     PopupCreateEntry(menu_array,3," New",3,'N',0,menu_func);
  341.     PopupCreateEntry(menu_array,4," Save      F2",4,'S',F2,menu_func);
  342.     PopupCreateEntry(menu_array,5," Write to    ",5,'W',0,menu_func);
  343.     PopupCreateEntry(menu_array,6," Directory   ",6,'D',0,menu_func);
  344.     PopupCreateEntry(menu_array,7," Change Dir  ",7,'C',0,menu_func);
  345.     PopupCreateEntry(menu_array,8," OS Shell    ",8,'O',0,menu_func);
  346.     PopupCreateEntry(menu_array,9," Quit  Alt-X ",9,'Q',ALTX,0,menu_func);
  347.  
  348.     /* end all of the menu entries */
  349.     PopupEntryEnd(menu_array,NUMENTRIES);
  350.   }
  351.  
  352.   The method above does not call PopupAllocate() because the number of
  353.   entries was already determined and an array was already set up at compile
  354.   time.
  355.  
  356.   PopupCreateEntry() is called for each menu entry as before, and
  357.   PopupEntryEnd() is called to terminate the menu entries.
  358.  
  359.   To use this method, you must declare an array of menu entries with at least
  360.   one more than the desired number of entries.  Also note that
  361.   PopupDeallocate() MUST NOT be called because the array of menu entries was
  362.   not created with PopupAllocate().
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.   Creating bar menu entries dynamically
  395.   -------------------------------------
  396.  
  397.   Here is an example:
  398.  
  399.   Usual method:
  400.   ------------
  401.  
  402.   #include "menu.h"
  403.   int menu_func();
  404.  
  405.   BAR_MENU_ENTRY bar_items[] = {
  406.                                "File",1,4,'F',ALTF,menu_func,
  407.                                "Edit",1,10,'E',0,menu_func,
  408.                                "Run",1,17,'R',0,menu_func,
  409.                                "Compile",1,23,'C',0,menu_func,
  410.                                "Project",1,33,'P',0,menu_func,
  411.                                "Options", 1,43,'O',0,menu_func,
  412.                                "Debug",1,53,'D',0,menu_func,
  413.                                "Break/watch",1,61,'B',0,menu_func,
  414.                                CWL_NULL};
  415.  
  416.  
  417.   New Method
  418.   ----------
  419.  
  420.   #include "menu.h"
  421.   #define NUMENTRIES 8
  422.  
  423.   BAR_MENU_ENTRY_PTR menu_array; /* Notice that we have a pointer to what
  424.                                       will be an array of BAR_MENU_ENTRY's
  425.                                    */
  426.   BAR_MENU_PTR b;
  427.  
  428.   main()
  429.   {
  430.     WindowInitializeSystem();
  431.  
  432.     /* Initialize with at least number of total entries */
  433.     menu_array = BarAllocate(NUMENTRIES);
  434.  
  435.     /* Call function to create entries in menu_array sequentially */
  436.     BarCreateEntry(menu_array,   /* BAR_MENU_ENTRY pointer */
  437.               1,            /* entry number */
  438.  
  439.         /* The rest of the arguments are just like the old method */
  440.               "File", /* menu string */
  441.                1,     /* row number */
  442.                4,     /* col. number */
  443.               'F',    /* hotkey letter */
  444.               ALTF,   /* secondary hotkey */
  445.               menu_func);  /* function to perform */
  446.  
  447.  
  448.  
  449.  
  450.     /* do rest of the entries */
  451.     BarCreateEntry(menu_array,2,"Edit",1,10,'E',0,menu_func);
  452.     BarCreateEntry(menu_array,3,"Run",1,17,'R',0,menu_func);
  453.     BarCreateEntry(menu_array,4,"Compfile",1,23,'C',0,menu_func);
  454.     BarCreateEntry(menu_array,5,"Project",1,33,'P',0,menu_func);
  455.     BarCreateEntry(menu_array,6,"Options",1,43,'O',0,menu_func);
  456.     BarCreateEntry(menu_array,7,"Debug",  1,53,'D',0,menu_func);
  457.     BarCreateEntry(menu_array,8,"Break/watch",1,61,'B',0,menu_func);
  458.  
  459.     /* end all of the menu entries */
  460.     BarEntryEnd(menu_array,NUMENTRIES);
  461.  
  462.     /* create menu */
  463.     b = BarCreateMenu(menu_array, /* rest of the arguments */);
  464.  
  465.     /* ... */
  466.  
  467.     /* Dispose of menu entries created */
  468.     BarDeallocate(menu_array);
  469.   }
  470.  
  471.  
  472.   The difference between the above method and the method used to globally
  473.   initialize an array are the following:
  474.  
  475.   1) The variable type for menu_array is BAR_MENU_ENTRY_PTR, not
  476.      BAR_MENU_ENTRY as the normal method would have done.
  477.  
  478.   2) You must call the BarAllocate() function to allocate space for the
  479.      number of entries desired.  If you do not call BarAllocate(), you will
  480.      surely get a memory overwrite error.  The return value to BarAllocate()
  481.      must be assigned to a BAR_MENU_ENTRY_PTR, as the above example shows.
  482.  
  483.      The array of menu entries are allocated from the heap at runtime, as
  484.      opposed to the static method which sets up the memory scheme at link time.
  485.  
  486.   3) The next thing you must do is to fill in the entry information by calling
  487.      the BarCreateEntry() function.  The first argument to the BarCreateEntry()
  488.      function is the BAR_MENU_ENTRY_PTR.  The second argument is the entry
  489.      number to assign this information to.  The rest of the arguments are the
  490.      same order as the usual method i.e. menu string, row, column, hotkey,
  491.      etc.  BarCreateEntry() is called for each field desired.
  492.  
  493.   4) The BarEndEntry() function must be called to terminate the list of
  494.      entries.  The first argument is the BAR_MENU_ENTRY_PTR, and the second
  495.      argument is the total number of entries defined.
  496.  
  497.   5) You should call BarDeallocate() to free the memory assigned to the array
  498.      of menu_entries.  The only argument to BarDeallocate() is the
  499.      BAR_MENU_ENTRY_PTR.  Only call BarDeallocate() after you have called
  500.      BarMenuFree() or any function that disposes of the BAR_MENU_PTR.
  501.  
  502.  
  503.  
  504.  
  505.  
  506.   All of these functions except for BarAllocate() have no return values.
  507.   The BarAllocate() function returns a BAR_MENU_ENTRY_PTR if successful,
  508.   and a null pointer if unsuccessful.
  509.  
  510.  
  511.   You could also do the following:
  512.  
  513.   #include "menu.h"
  514.   #define NUMENTRIES 8
  515.  
  516.   BAR_MENU_ENTRY menu_array[NUMENTRIES+1]; /* We must have at least 1 more
  517.                                                 than the number of entries */
  518.   BAR_MENU_PTR b;
  519.  
  520.   main()
  521.   {
  522.      /* ... */
  523.  
  524.     /* Call function to create entries in menu_array sequentially */
  525.     BarCreateEntry(menu_array,   /* BAR_MENU_ENTRY pointer */
  526.               1,            /* entry number */
  527.  
  528.         /* The rest of the arguments are just like the old method */
  529.               "File", /* menu string */
  530.                1,     /* row number */
  531.                4,     /* col. number */
  532.               'F',    /* hotkey letter */
  533.               ALTF,   /* secondary hotkey */
  534.               menu_func);  /* function to perform */
  535.  
  536.  
  537.     /* do rest of the entries */
  538.     BarCreateEntry(menu_array,2,"Edit",1,10,'E',0,menu_func);
  539.     BarCreateEntry(menu_array,3,"Run",1,17,'R',0,menu_func);
  540.     BarCreateEntry(menu_array,4,"Compfile",1,23,'C',0,menu_func);
  541.     BarCreateEntry(menu_array,5,"Project",1,33,'P',0,menu_func);
  542.     BarCreateEntry(menu_array,6,"Options",1,43,'O',0,menu_func);
  543.     BarCreateEntry(menu_array,7,"Debug",  1,53,'D',0,menu_func);
  544.     BarCreateEntry(menu_array,8,"Break/watch",1,61,'B',0,menu_func);
  545.  
  546.     /* end all of the menu entries */
  547.     BarEntryEnd(menu_array,NUMENTRIES);
  548.   }
  549.  
  550.   The method above does not call BarAllocate() because the number of
  551.   entries was already determined and an array was already set up at compile
  552.   time.
  553.  
  554.   BarCreateEntry() is called for each menu entry as before, and BarEntryEnd()
  555.   is called to terminate the menu entries.
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.   To use this method, you must declare an array of menu entries with at least
  563.   one more than the desired number of entries.  Also note that
  564.   BarDeallocate() MUST NOT be called because the array of menu entries was
  565.   not created with BarAllocate().
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.   Checking for mouse presses
  619.   --------------------------
  620.  
  621.   The GET_MPRESS_KEY() and GET_MPRESS_ENHANCED_KEY() macros work the same as
  622.   the GET_KEY() and GET_ENHANCED_KEY() macros respectively, except that
  623.   GET_MPRESS_KEY() and GET_MPRESS_ENHANCED_KEY() also test to see if one or
  624.   more mouse buttons has been pressed.
  625.  
  626.   When GET_MPRESS_KEY() or GET_MPRESS_ENHANCED_KEY() is called, the program is
  627.   suspended until a key on the keyboard is pressed, or one or more mouse
  628.   buttons has been pressed.  The difference between these two macros is that
  629.   GET_MPRESS_ENHANCED_KEY() recognizes keys on an enhanced (101 key) keyboard.
  630.   Here is a prototype for both of these macros:
  631.  
  632.     unsigned int GET_MPRESS_KEY(int *which)
  633.  
  634.     unsigned int GET_MPRESS_ENHANCED_KEY(int *which)
  635.  
  636.   The only argument is a pointer to an integer which will contain either
  637.   MOUSEPRESSED if the mouse was pressed, or KEYBOARDPRESSED if a key on the
  638.   keyboard was pressed.  The kyboard_idle_func and keyboard_intercept_func
  639.   function pointers are fully implemented when either of these macros are
  640.   called.
  641.  
  642.   Both of these macros return either the key that was struck, or the mouse
  643.   button(s) that was(were) pressed.  The values for these mouse buttons are as
  644.   follows:
  645.  
  646.  
  647.   MOUSELEFT_PRESS   - Left button was pressed.
  648.  
  649.   MOUSERIGHT_PRESS  - Right button was pressed.
  650.  
  651.   MOUSEMIDDLE_PRESS - Middle button was pressed.
  652.  
  653.   MOUSELEFTRIGHT_PRESS  - Left and Right was pressed simultaneously.
  654.  
  655.   MOUSEMIDDLERIGHT_PRESS - Middle and Right buttons were pressed
  656.                            simultaneously.
  657.  
  658.   MOUSEMIDDLELEFT_PRESS  - Middle and Left buttons pressed simultaneously.
  659.  
  660.   MOUSEMIDDLERIGHTLEFT_PRESS - Middle, right, and left buttons pressed
  661.                                simultaneously.
  662.  
  663.   If a keyboard key is hit, the return values are the same as for GET_KEY() or
  664.   GET_ENHANCED_KEY().
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.   Example:
  676.  
  677.  
  678.   #include "cwlmouse.h"
  679.   #include "window.h"
  680.   #define NORM  CREATE_VIDEO_ATTRIBUTE(BLACK_,WHITE_)
  681.  
  682.   void print_nums();
  683.  
  684.   main()
  685.   {
  686.     int w,b;
  687.     unsigned ch;
  688.     WindowInitializeSystem();
  689.     ClearScreen(NORM);
  690.     MouseInitializeSystem(MOUSE_FULL_INSTALL,&b,10,10);
  691.     key_idle_func = print_nums;
  692.     ch = GET_MPRESS_KEY(&w);
  693.     VideoPrintf("\nThe %s was pressed.  Value is %d",
  694.                  (w==MOUSEPRESSED?"Mouse":"Keyboard"),ch);
  695.     MouseRestoreSystem();
  696.   }
  697.  
  698.   void print_nums()
  699.   {
  700.     static int count = 0;
  701.     MoveCursor(1,1,0);
  702.     VideoPrintf("%d",count++);
  703.   }
  704.  
  705.